<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilloader: xloader_cfi.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilloader
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xloader__cfi_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xloader_cfi.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the code related to PDI image loading. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
</p>
<hr/>
<p>
1.00  bsv   06/17/2019 Initial release
1.01  bsv   04/09/2020 Code clean up of xilloader
1.02  kc    08/03/2020 Added status prints for CFU/CFI errors
      kal   08/12/2020 Added PlHouseCleaning in case of any PL error.
      td    08/19/2020 Fixed MISRA C violations Rule 10.3
      bsv   10/13/2020 Code clean up
1.03  kal   12/22/2020 Perform Cfu/Cfi recovery before re-triggering
                       PL House cleaning in case of error in PL loading.
1.04  skd   03/25/2021 Compilation warning fix
1.05  td    07/08/2021 Fix doxygen warnings
      td    07/15/2021 Fix doxygen warnings
      bsv   07/18/2021 Debug enhancements
      bsv   08/31/2021 Code clean up
      ma    09/01/2021 Fix issue in clearing the CFI and CFU errors
1.06  am    11/24/2021 Fixed doxygen warning
      bsv   12/04/2021 Addressed security review comment
1.07  ma    01/17/2022 Enable SLVERR for CFU_APB registers
1.08  ma    07/27/2022 Added support for CFrame data clear check which is
                       required during PL secure lockdown
1.09  ng    11/11/2022 Updated doxygen comments
      ng    03/12/2023 Fixed Coverity warnings
      sk    03/14/2023 Added Glitch detect for status check in
                       XLoader_CframeDataClearCheck
      dd    03/28/2023 Updated doxygen comments
      ng    03/30/2023 Updated algorithm and return values in doxygen comments
1.10  ng    06/26/2023 Added support for system device tree flow
2.00  ng    01/26/2024 Added header file for minor error codes
      sk    03/13/24 Fixed doxygen comments format
      pre   08/22/2024 Added XLoader_CfiSelectiveRead command execution
      pre   08/25/2024 Fixed build issue for PLM_DEBUG_MODE
      pre   10/22/2024 Made CFI_selective_read feature configurable</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaf062051d3fb77de1a64d1c59099d39de"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gaf062051d3fb77de1a64d1c59099d39de">CFRAME_BCAST_REG_TESTMODE_OFFSET</a>&#160;&#160;&#160;(0x120U)</td></tr>
<tr class="memdesc:gaf062051d3fb77de1a64d1c59099d39de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test mode offset.  <a href="group__xloader__server__apis.html#gaf062051d3fb77de1a64d1c59099d39de">More...</a><br/></td></tr>
<tr class="separator:gaf062051d3fb77de1a64d1c59099d39de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cb237f68a9fc494cb17b1e4c78a71e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga4cb237f68a9fc494cb17b1e4c78a71e1">CFRAME_BCAST_REG_TESTMODE_CRAM_SELF_CHECK_MASK</a>&#160;&#160;&#160;(0x100U)</td></tr>
<tr class="memdesc:ga4cb237f68a9fc494cb17b1e4c78a71e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">CRAM self check mask.  <a href="group__xloader__server__apis.html#ga4cb237f68a9fc494cb17b1e4c78a71e1">More...</a><br/></td></tr>
<tr class="separator:ga4cb237f68a9fc494cb17b1e4c78a71e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad043b6b35eb2a61501ee7d2b7d2dac35"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gad043b6b35eb2a61501ee7d2b7d2dac35">CFRAME_BCAST_REG_FAR_OFFSET</a>&#160;&#160;&#160;(0x10U)</td></tr>
<tr class="memdesc:gad043b6b35eb2a61501ee7d2b7d2dac35"><td class="mdescLeft">&#160;</td><td class="mdescRight">CFrame address register offset.  <a href="group__xloader__server__apis.html#gad043b6b35eb2a61501ee7d2b7d2dac35">More...</a><br/></td></tr>
<tr class="separator:gad043b6b35eb2a61501ee7d2b7d2dac35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaecec768f7aa5f3c9bdbb23ca2f79af31"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gaecec768f7aa5f3c9bdbb23ca2f79af31">CFRAME_BCAST_REG_FAR_BLOCKTYPE_SHIFT</a>&#160;&#160;&#160;(20U)</td></tr>
<tr class="memdesc:gaecec768f7aa5f3c9bdbb23ca2f79af31"><td class="mdescLeft">&#160;</td><td class="mdescRight">CFrame address register block type shift.  <a href="group__xloader__server__apis.html#gaecec768f7aa5f3c9bdbb23ca2f79af31">More...</a><br/></td></tr>
<tr class="separator:gaecec768f7aa5f3c9bdbb23ca2f79af31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17e70988fc31bef75378289d76c871ac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga17e70988fc31bef75378289d76c871ac">CFRAME_MAX_BLOCK_TYPE_COUNT</a>&#160;&#160;&#160;(0x3U)</td></tr>
<tr class="memdesc:ga17e70988fc31bef75378289d76c871ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">CFrame maximum block type count.  <a href="group__xloader__server__apis.html#ga17e70988fc31bef75378289d76c871ac">More...</a><br/></td></tr>
<tr class="separator:ga17e70988fc31bef75378289d76c871ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ae2a99f34bb1f1b102eaaac9ee1dd21"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga4ae2a99f34bb1f1b102eaaac9ee1dd21">XPLMI_ZERO</a>&#160;&#160;&#160;(0x0U)</td></tr>
<tr class="memdesc:ga4ae2a99f34bb1f1b102eaaac9ee1dd21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zero.  <a href="group__xloader__server__apis.html#ga4ae2a99f34bb1f1b102eaaac9ee1dd21">More...</a><br/></td></tr>
<tr class="separator:ga4ae2a99f34bb1f1b102eaaac9ee1dd21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad74c706747e37822e8d9a5524cc341ea"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gad74c706747e37822e8d9a5524cc341ea">CFRAME_CRC_POLL_TIMEOUT</a>&#160;&#160;&#160;(0xFFFFU)</td></tr>
<tr class="memdesc:gad74c706747e37822e8d9a5524cc341ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">CRC poll time out.  <a href="group__xloader__server__apis.html#gad74c706747e37822e8d9a5524cc341ea">More...</a><br/></td></tr>
<tr class="separator:gad74c706747e37822e8d9a5524cc341ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8baed59f0b542201eae4c147aad4e686"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga8baed59f0b542201eae4c147aad4e686">XLOADER_CFRAME_DATACLEAR_CHECK_CMD_ID</a>&#160;&#160;&#160;(0xCU)</td></tr>
<tr class="memdesc:ga8baed59f0b542201eae4c147aad4e686"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data clear check command Id.  <a href="group__xloader__server__apis.html#ga8baed59f0b542201eae4c147aad4e686">More...</a><br/></td></tr>
<tr class="separator:ga8baed59f0b542201eae4c147aad4e686"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga891205248039898c45e6ba5b3cce1d60"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga891205248039898c45e6ba5b3cce1d60">PMC_GLOBAL_PMC_ERR2_STATUS_CFI_SHIFT</a>&#160;&#160;&#160;(16U)</td></tr>
<tr class="memdesc:ga891205248039898c45e6ba5b3cce1d60"><td class="mdescLeft">&#160;</td><td class="mdescRight">CFI Non-Correctable Error shift.  <a href="group__xloader__server__apis.html#ga891205248039898c45e6ba5b3cce1d60">More...</a><br/></td></tr>
<tr class="separator:ga891205248039898c45e6ba5b3cce1d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga953be1ba88ede7dedb1f86081b14f221"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga953be1ba88ede7dedb1f86081b14f221">XLoader_CframeInit</a> (void)</td></tr>
<tr class="memdesc:ga953be1ba88ede7dedb1f86081b14f221"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the Cframe driver.  <a href="group__xloader__server__apis.html#ga953be1ba88ede7dedb1f86081b14f221">More...</a><br/></td></tr>
<tr class="separator:ga953be1ba88ede7dedb1f86081b14f221"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga389dc49f070aafe94e78fd1009de7038"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#ga389dc49f070aafe94e78fd1009de7038">XLoader_CframeErrorHandler</a> (u32 ImageId)</td></tr>
<tr class="memdesc:ga389dc49f070aafe94e78fd1009de7038"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to check the CFU ISR and PMC_ERR1 and PMC_ERR2 status registers to check for any errors in PL and call corresponding error recovery functions if needed.  <a href="group__xloader__server__apis.html#ga389dc49f070aafe94e78fd1009de7038">More...</a><br/></td></tr>
<tr class="separator:ga389dc49f070aafe94e78fd1009de7038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac94a1020e3745f6791480bf86040a759"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gac94a1020e3745f6791480bf86040a759">XLoader_CframeDataClearCheck</a> (XPlmi_Cmd *Cmd)</td></tr>
<tr class="memdesc:gac94a1020e3745f6791480bf86040a759"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to check if the Cframe data is cleared or not using CRC method.  <a href="group__xloader__server__apis.html#gac94a1020e3745f6791480bf86040a759">More...</a><br/></td></tr>
<tr class="separator:gac94a1020e3745f6791480bf86040a759"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed8ea42231382fe5a5a155bd327b15ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xloader__server__apis.html#gaed8ea42231382fe5a5a155bd327b15ff">XLoader_CfiSelectiveRead</a> (XPlmi_Cmd *Cmd)</td></tr>
<tr class="memdesc:gaed8ea42231382fe5a5a155bd327b15ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function provides CFI SELECTIVE READ command execution.  <a href="group__xloader__server__apis.html#gaed8ea42231382fe5a5a155bd327b15ff">More...</a><br/></td></tr>
<tr class="separator:gaed8ea42231382fe5a5a155bd327b15ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
